package cate.game.role.task.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTask;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "领取每周任务活跃宝箱奖励 の 请求")
public class TaskWeeklyBoxGetReq implements MsgInput {
    @NoteField(value = "宝箱ID")
    public int boxId;

    @Override
    public MsgConfig conf() {
        return MsgIdBTask.WEEKLY_BOX_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult r = cc.getRole().getTask().weekly.getBox(boxId);
        game.notice.message(cc.getRole(), r, true);
    }
}
